package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

/**
 * Created by IntelliJ IDEA.
 * User: Manu
 * Date: Aug 2, 2009
 * Time: 10:25:20 AM
 * To change this template use File | Settings | File Templates.
 */
public interface AuthentificationService extends RemoteService {

    boolean authentifier(String utilisateur, String password);
    /**
     * Utility/Convenience class.
     * Use AuthentificationService.App.getInstance() to access static instance of AuthentificationServiceAsync
     */
    public static class App {
        private static final AuthentificationServiceAsync ourInstance;

        static {
            ourInstance = (AuthentificationServiceAsync) GWT.create(AuthentificationService.class);
            ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "AuthentificationService");
        }

        public static AuthentificationServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
